#pragma once
#include "Controls/Control.h"
#include <string>
namespace cxgui
{
using namespace ci;
using namespace std;
/// Represents a block of text
class TextBlock : public Control
{
public:
	// Constructors
	TextBlock();
	explicit TextBlock(const string& text);

	// Getters

	/// Returns the text of the control
	string GetText() const;	

	// Setters
	
	/// Sets the text of the control
	void SetText(const string& text);

	virtual void Draw() override;
	virtual Vec2f GetPreferedSize() override;

	virtual ~TextBlock();

protected:

	virtual void DrawText();
	virtual void OnTextChanged();

	string _text;

};
}
